package day6;
import java.io.*;
import java.util.Arrays;
import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest {
    public static void main(String[] args) {
        //路径
        File file=new File("D:/Documents/桌面/83");
        System.out.println("文件名："+file.getName());
        System.out.println("全名："+file.getAbsolutePath());
        System.out.println("大小："+file.length());
        System.out.println("文件夹？"+file.isDirectory());
        System.out.println("文件？"+file.isFile());
        System.out.println("是否存在？"+file.exists());
        System.out.println("最后修改时间？"+new Date(file.lastModified()));
        String[] list = file.list();
        System.out.println(Arrays.toString(list));
    }
}
